	

package com.lbs.core.shared.tables;

import java.util.ArrayList;
import java.util.List;

public class LbsMetaField {
	private String name;
	private String label;
	private String type;
	private String mask;
	private Boolean onList;
	private Boolean onNew;
	private Boolean onEdit;
	private Boolean notNull;
	private Boolean editable;
	private Boolean listable;
	private Boolean isPass;
	private Boolean forceOnList;
	private String searchView;
	private String relationTo;
	private String relationDefaultValue;
	private String depend;
	private String defaultValue;
	private Integer maxLen;
	private Integer minLen;
	private Integer len;
	
	
	private List<LbsFilter> filters = new ArrayList<LbsFilter>();
	
	
//	LbsMetaField(String name, String desc, String type){
//		this(name,desc,type,false);
//	}
//	
	public LbsMetaField(String name, String label, String type, Boolean visible){
		this.notNull=false;
		this.onList=false;
		this.onNew=true;
		this.onEdit=true;
		this.editable=true;
		this.listable=true;
		this.isPass=false;
		this.forceOnList=true;
		this.searchView = null;
		this.setName(name);
		this.setLabel(label);
		this.setType(type);
		this.setOnList(visible);
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String desc) {
		this.label = desc;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getOnList() {
		return onList;
	}

	public void setOnList(Boolean visible) {
		this.onList = visible;
	}

	public Boolean getNotNull() {
		return notNull;
	}

	public void setNotNull(Boolean notNull) {
		this.notNull = notNull;
	}

	public String getRelationTo() {
		return relationTo;
	}

	public void setRelationTo(String relationTo) {
		this.relationTo = relationTo;
	}

	public String getRelationDefaultValue() {
		return relationDefaultValue;
	}

	public void setRelationDefaultValue(String relationDefaultValue) {
		this.relationDefaultValue = relationDefaultValue;
	}

	public String getDepend() {
		return depend;
	}

	public void setDepend(String depend) {
		this.depend = depend;
	}
	
	public void addFilter(LbsFilter f){
		filters.add(f);
	}

	public List<LbsFilter> getFilters() {
		return filters;
	}

	public Integer getMaxLen() {
		return maxLen;
	}

	public void setMaxLen(Integer maxLen) {
		this.maxLen = maxLen;
	}

	public Integer getMinLen() {
		return minLen;
	}

	public void setMinLen(Integer minLen) {
		this.minLen = minLen;
	}

	public Integer getLen() {
		return len;
	}

	public void setLen(Integer len) {
		this.len = len;
	}

	public Boolean getOnNew() {
		return onNew;
	}

	public void setOnNew(Boolean onNew) {
		this.onNew = onNew;
	}

	public Boolean getOnEdit() {
		return onEdit;
	}

	public void setOnEdit(Boolean onEdit) {
		this.onEdit = onEdit;
	}

	public Boolean getEditable() {
		return editable;
	}

	public void setEditable(Boolean editable) {
		this.editable = editable;
	}

	public Boolean getIsPass() {
		return isPass;
	}

	public void setIsPass(Boolean isPass) {
		this.isPass = isPass;
	}

	public Boolean getListable() {
		return listable;
	}

	public void setListable(Boolean listable) {
		this.listable = listable;
	}

	public String getDefault() {
		return defaultValue;
	}

	public void setDefault(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public Boolean getForceOnList() {
		return forceOnList;
	}

	public void setForceOnList(Boolean forceOnList) {
		this.forceOnList = forceOnList;
	}

	public String getMask() {
		return mask;
	}

	public void setMask(String mask) {
		this.mask = mask;
	}
	public String getSearchView() {
		return this.searchView;
	}
	public void setSearchView(String searchView) {
		this.searchView = searchView;
	}
	
}
